1. Field of the Invention
The present invention relates to a digital video signal code size control apparatus used for video editing and transmission using a medium storing the video in a digital format.
2. Description of the Prior Art
With recent advances in video coding technologies, it has become possible to efficiently encode and compress video image signals using selected characteristics of human visual perception. For example, the JPEG (Joint Photographic Experts Group) compression method can compress image signal to approximately 1/20 the size of the source image signal with minimal visually-perceptible deterioration.
With highly efficiently compression methods such as this, however, the data quantity after encoding, i.e., the encoded data size, varies with the image being encoded. A digital video signal code size control apparatus controls the encoding operation so that the encoded data can be stored within a fixed block size. A block diagram of this conventional digital video signal code size control apparatus is shown in FIG. 10.
This conventional digital video signal code size control apparatus comprises an image memory 1001 storing the source image signal, a JPEG compression device 1002 handling the actual data compression, a standard look-up table memory 1003 storing the standard quantization table (specific example of which is shown in FIG. 11), a coefficient memory 1004 for storing the real number multiplied by each element of the standard quantization table shown in FIG. 11, a default value memory 1006 storing the default value "1" of the coefficient memory 1004, a coding size comparator 1007 for comparing the code size resulting from compression by the JPEG compression device 1002 with the predetermined target block size, an addend memory 1008 storing the constant "1", an adder 1009 adding the value fetched from the addend memory 1008 to the value stored in the coefficient memory 1004, a selector switch 1010, and an output switch 1011.
The data compression algorithm of the JPEG compression device 1002 is described under "DCT (discrete cosine transformation) based systems" in the "Draft (Revision 6) of the JPEG algorithm" (ISO/IEC, JTC1/SC2/WG8) of Jun. 24, 1990. The parameters stored in the standard quantization table memory 1003 are multiplied by the value in the coefficient memory 1004 by the multiplier 1005, and the products are output to the JPEG compression device 1002 as the revised quantization table value.
The selector switch 1010 operates as follows. When the image is input to the image memory 1001, the selector switch 1010 selects the default value memory 1006 input. When the coding size comparator 1007 determines that the size of the coded data output by the JPEG compression device 1002 is greater than the target block size, the selector switch 1010 selects the adder 1009 input. At all other times, the selector switch 1010 switches OFF so that the value stored in the coefficient memory 1004 does not change.
The output switch 1011 outputs the compression result only when the coding size comparator 1007 determines that the size of the encoded data output by the JPEG compression device 1002 does not exceed the target block size.
The operation of the conventional digital video signal code size control apparatus shown in FIG. 10 is described below.
The images are temporarily accumulated in the image memory 1001, at which time the selector switch 1010 selects the default value memory 1006 to set a value of "1" in the coefficient memory 1004. The quantization table values shown in the standard quantization table in FIG. 11 are obtained because each of the elements in the standard quantization table memory 1003 is multiplied by the value "1" from the coefficient memory 1004, and these quantization table values are used by the JPEG compression device 1002 to compress the image in the image memory 1001. The compressed code size is then compared by the code size comparator 1007 with the predetermined target block size, and if the compressed code size is greater than the target block size, the coding size comparator 1007 sets the selector switch 1010 to the adder 1009 side. The value of the addend memory 1008 is therefore added to the value from the coefficient memory 1004, resulting in a new coefficient of 2. The quantization table data is thus rewritten, doubling each of the parameters in the standard quantization table. These new parameters are then used by the JPEG compression device 1002 to re-compress the image in the image memory 1001. This sequence of operations is repeated until the coding size comparator 1007 determines that the compression result does not exceed the target block size.
When the coding size comparator 1007 determines that the compression result does not exceed the target block size, output switch 1011 becomes ON (continuous to the JPEG compression device 1002 output), and the compression result is output.
The conventional digital video signal code size control apparatus will thus always output a compressed image smaller than the predetermined target block size.
Because this conventional digital video signal code size control apparatus encodes the source data and then compares the result with the fixed block size, the number of loops required for the coding result to equal the fixed block size cannot be predicted, and the time required to compress and encode a single image cannot be predetermined.
As a result, real-time coding to within a predetermined fixed block size is not possible when inputting rapidly moving digitized images, such as NTSC or PAL format television broadcast images with 60 or 50 fields per second, to a conventional digital video signal code size control apparatus as described above.